3.3.65 \(\int \frac {\cos (x)}{a-a \sin ^2(x)} \, dx\) [265]

Optimal. Leaf size=7 \[ \frac {\tanh ^{-1}(\sin (x))}{a} \]

[Out]

arctanh(sin(x))/a

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 7, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3254, 3855} \begin {gather*} \frac {\tanh ^{-1}(\sin (x))}{a} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[x]/(a - a*Sin[x]^2),x]

[Out]

ArcTanh[Sin[x]]/a

Rule 3254

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\cos (x)}{a-a \sin ^2(x)} \, dx &=\frac {\int \sec (x) \, dx}{a}\\ &=\frac {\tanh ^{-1}(\sin (x))}{a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(37\) vs. \(2(7)=14\).
time = 0.00, size = 37, normalized size = 5.29 \begin {gather*} \frac {-\log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )+\log \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )}{a} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]/(a - a*Sin[x]^2),x]

[Out]

(-Log[Cos[x/2] - Sin[x/2]] + Log[Cos[x/2] + Sin[x/2]])/a

________________________________________________________________________________________

Maple [A]
time = 0.09, size = 8, normalized size = 1.14

method result size
derivativedivides \(\frac {\arctanh \left (\sin \left (x \right )\right )}{a}\) \(8\)
default \(\frac {\arctanh \left (\sin \left (x \right )\right )}{a}\) \(8\)
norman \(\frac {\ln \left (\tan \left (\frac {x}{2}\right )+1\right )}{a}-\frac {\ln \left (\tan \left (\frac {x}{2}\right )-1\right )}{a}\) \(25\)
risch \(\frac {\ln \left ({\mathrm e}^{i x}+i\right )}{a}-\frac {\ln \left ({\mathrm e}^{i x}-i\right )}{a}\) \(29\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)/(a-a*sin(x)^2),x,method=_RETURNVERBOSE)

[Out]

arctanh(sin(x))/a

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 21 vs. \(2 (7) = 14\).
time = 0.28, size = 21, normalized size = 3.00 \begin {gather*} \frac {\log \left (\sin \left (x\right ) + 1\right )}{2 \, a} - \frac {\log \left (\sin \left (x\right ) - 1\right )}{2 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(a-a*sin(x)^2),x, algorithm="maxima")

[Out]

1/2*log(sin(x) + 1)/a - 1/2*log(sin(x) - 1)/a

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 20 vs. \(2 (7) = 14\).
time = 0.40, size = 20, normalized size = 2.86 \begin {gather*} \frac {\log \left (\sin \left (x\right ) + 1\right ) - \log \left (-\sin \left (x\right ) + 1\right )}{2 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(a-a*sin(x)^2),x, algorithm="fricas")

[Out]

1/2*(log(sin(x) + 1) - log(-sin(x) + 1))/a

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 19 vs. \(2 (5) = 10\).
time = 0.08, size = 19, normalized size = 2.71 \begin {gather*} - \frac {\log {\left (\sin {\left (x \right )} - 1 \right )}}{2 a} + \frac {\log {\left (\sin {\left (x \right )} + 1 \right )}}{2 a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(a-a*sin(x)**2),x)

[Out]

-log(sin(x) - 1)/(2*a) + log(sin(x) + 1)/(2*a)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 23 vs. \(2 (7) = 14\).
time = 0.43, size = 23, normalized size = 3.29 \begin {gather*} \frac {\log \left (\sin \left (x\right ) + 1\right )}{2 \, a} - \frac {\log \left (-\sin \left (x\right ) + 1\right )}{2 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(a-a*sin(x)^2),x, algorithm="giac")

[Out]

1/2*log(sin(x) + 1)/a - 1/2*log(-sin(x) + 1)/a

________________________________________________________________________________________

Mupad [B]
time = 13.60, size = 7, normalized size = 1.00 \begin {gather*} \frac {\mathrm {atanh}\left (\sin \left (x\right )\right )}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)/(a - a*sin(x)^2),x)

[Out]

atanh(sin(x))/a

________________________________________________________________________________________